package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import Entidades.ContenidoEnt;
import java.util.List;

public final class contenidoListar_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List<String> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.ArrayList<String>(1);
    _jspx_dependants.add("/./Menu2.jsp");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_c_forEach_var_items;

  private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;

  public java.util.List<String> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _jspx_tagPool_c_forEach_var_items = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _jspx_tagPool_c_forEach_var_items.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("\n");
      out.write("\n");

    int  row = 1;
    List<ContenidoEnt> lstContenido;
    lstContenido = request.getAttribute("lstContenido") != null ? (List<ContenidoEnt>) request.getAttribute("lstContenido") : null;
    
    int busqueda = request.getAttribute("busqueda") == null ? -1 : Integer.parseInt(request.getAttribute("busqueda").toString());

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<!DOCTYPE html>\n");
      out.write("\n");
      out.write("<html >\n");
      out.write("    <head>\n");
      out.write("        <title>Listar Contenido</title>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/tabber.js\"></script>\n");
      out.write("        <link rel=\"stylesheet\" href=\"css/example.css\" TYPE=\"text/css\" MEDIA=\"screen\"/>\n");
      out.write("        <link rel=\"stylesheet\" href=\"css/example-print.css\" TYPE=\"text/css\" MEDIA=\"print\"/>\n");
      out.write("        <link rel=\"stylesheet\" href=\"css/MenuPrincipal.css\" TYPE=\"text/css\" MEDIA=\"screen\"/>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/general.js\"></script>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/jquery-1.5.2.min.js\"></script>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/Funciones.js\"></script>\n");
      out.write("        <script type='text/javascript' src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"/>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/jquery-1.4.2.min.js\"></script>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/jquery.fixedMenu.js\"></script>\n");
      out.write("        <script type=\"text/javascript\" src=\"js/general.js\"></script>\n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/fixedMenu_style2.css\" />\n");
      out.write("        <link rel=\"stylesheet\" href=\"css/style.css\" />\n");
      out.write("        <script type=\"text/javascript\" src=\"js/jquery.paginate.js\"></script>\n");
      out.write("        \n");
      out.write("        <link rel=\"stylesheet\" type=\"text/css\" href=\"css/styleMenu.css\" />\n");
      out.write("        \n");
      out.write("        <script type=\"text/javascript\">\n");
      out.write("            $(document).ready(function() {\n");
      out.write("                $('#listitems').paginate({itemsPerPage: 10});\n");
      out.write("            });\n");
      out.write("        </script>\n");
      out.write("        \n");
      out.write("        <script language=\"javaScript\" type=\"text/javascript\">\n");
      out.write("  \n");
      out.write("\t  function inicio() {\n");
      out.write("\t\t  window.location.href = \"./ContenidoShow\";\n");
      out.write("\t  }\n");
      out.write("  \n");
      out.write("\t</script>\n");
      out.write("        \n");
      out.write("    </head>\n");
      out.write("\n");
      out.write("    <body>\n");
      out.write("        \n");
      out.write("         <div style=\"text-align: right;\">\n");
      out.write("            \n");
      out.write("            <a href=\"./CerrarSesion\" onclick=\"cerrarSession();\" style=\"text-decoration:none; color: #f7db64;\"/>Cerrar Sesion</a>\n");
      out.write("        </div>\n");
      out.write("      \n");
      out.write("       \n");
      out.write("\n");
      out.write("        \n");
      out.write("        <div style=\"background: #362f2d\">  \n");
      out.write("        \n");
      out.write("        <div align=\"center\" style=\"padding-top:30px \">  \n");
      out.write("            ");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("    <ul class=\"dark_menu\">\n");
      out.write("\n");
      out.write("        <li><a href=\"./ContenidoShow\" onclick=\"inicio();\" class=\"selected\">Inicio</a></li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("            <a href=\"#\">Usuarios</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"./usuarioListar.jsp\">Listar Usuarios</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./usuarioIngresar.jsp\">Ingresar Usuarios</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Clientes</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"#\">Listar Clientes</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./clienteIngresar.jsp\">Ingresar Cliente</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Instructores</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"#\">Listar Instructores</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./instructorIngresar.jsp\">Ingresar Instructores</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Gestionar Maestros</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"#\">Agenda</a></li>\n");
      out.write("\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Maquinas</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"./maquinaListar.jsp\">Listar Maquinas</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./maquinaIngresar.jsp\">Ingresar Nueva Maquina</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Ventas</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"./ventaIngresar.jsp\">Ingresar Nueva Venta</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./ventaListar.jsp\">Listar Ventas</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("            <a href=\"#\">Planes</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"./usuarioListar.jsp\">Listar Planes</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./planesIngresar.jsp\">Ingresar Planes</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("        <li>\n");
      out.write("\n");
      out.write("            <a href=\"#\">Contenido</a>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu Begin -->\n");
      out.write("\n");
      out.write("            <ul>\n");
      out.write("\n");
      out.write("                <li><a href=\"./contenidoIngresar.jsp\">Ingresar Nuevo Contenido</a></li>\n");
      out.write("\n");
      out.write("                <li><a href=\"./contenidoListar.jsp\">Listar Contenido</a></li>\n");
      out.write("\n");
      out.write("            </ul>\n");
      out.write("\n");
      out.write("            <!-- Sub Menu End -->\n");
      out.write("\n");
      out.write("        </li>\n");
      out.write("\n");
      out.write("    </ul>\n");
      out.write("\n");
      out.write("        <br>\n");
      out.write("        <br>\n");
      out.write("        <br>\n");
      out.write("        <br>");
      out.write("\n");
      out.write("            <FONT FACE=\"arial\" size=\"6\" COLOR=\"#282321\" style=\"text-align: center\">Listar Contenido</FONT>\n");
      out.write("\n");
      out.write("            \n");
      out.write("                      ");

                           if (busqueda == 0) {
                      
      out.write("\n");
      out.write("                           <div style=\"text-align: center\">\n");
      out.write("                                    \n");
      out.write("                                <span style=\"color:#f6bd30;text-align: center\">No hay registros en la Base de Datos</span>\n");
      out.write("                                   \n");
      out.write("                           </div>\n");
      out.write("                     ");
 }
      out.write("\n");
      out.write("       \n");
      out.write("\n");
      out.write("\n");
      out.write("                     \n");
      out.write("                   \n");
      out.write("                   <form action=\"./ContenidoOut\" method=\"POST\">\n");
      out.write("                    \n");
      out.write("                            <table>\n");
      out.write("\n");
      out.write("                                    <tr>\n");
      out.write("                                            <td><label>Titulo Contenido:</label>  </td>\n");
      out.write("                                            <td><input id=\"titulo\" name=\"titulo\" type=\"text\"> </td>\n");
      out.write("                                    </tr>\t\n");
      out.write("\n");
      out.write("                            </table>\n");
      out.write("\n");
      out.write("                        <br>\n");
      out.write("                        <br>\n");
      out.write("\n");
      out.write("\n");
      out.write("                            <div align=\"center\">\n");
      out.write("                                    <input type=\"submit\" value=\"Buscar\" class=\"button white\">\n");
      out.write("                            </div>\n");
      out.write("                   </form>  \n");
      out.write("                      \n");
      out.write("                      ");

                         if (busqueda == 1) {
                     
      out.write("\n");
      out.write("                    <table width=\"40%\" cellpadding=\"5\"  \n");
      out.write("                                     bgcolor=\"#FFFFFF\" border=\"1\"   cellspacing=\"0\">\n");
      out.write("                                       \n");
      out.write("                           <thead>\n");
      out.write("                                        <tr>\n");
      out.write("                                                   \n");
      out.write("                                                    <th scope=\"col\"> Titulo </th>\n");
      out.write("                                                    <th scope=\"col\"> Contenido </th>\n");
      out.write("                                                    <th scope=\"col\"> Sección </th>\n");
      out.write("                                                    <th scope=\"col\"> Acciones </th>\n");
      out.write("                                                    \n");
      out.write("                           \n");
      out.write("                                                \n");
      out.write("                                        </tr>                                   \n");
      out.write("                         </thead>           \n");
      out.write("                         \n");
      out.write("                         <tbody  id=\"listitems\">  \n");
      out.write("                             \n");
      out.write("                                       ");
      //  c:forEach
      org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_forEach_0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _jspx_tagPool_c_forEach_var_items.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
      _jspx_th_c_forEach_0.setPageContext(_jspx_page_context);
      _jspx_th_c_forEach_0.setParent(null);
      _jspx_th_c_forEach_0.setVar("lstContenido");
      _jspx_th_c_forEach_0.setItems(lstContenido);
      int[] _jspx_push_body_count_c_forEach_0 = new int[] { 0 };
      try {
        int _jspx_eval_c_forEach_0 = _jspx_th_c_forEach_0.doStartTag();
        if (_jspx_eval_c_forEach_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
          do {
            out.write("\n");
            out.write("\n");
            out.write("                                             ");

                                                if (row == 1) {
                                            
            out.write(" \n");
            out.write("                                                <tr class=\"odd\" >\n");
            out.write("                                                ");
 row = 0;
            out.write("    \n");
            out.write("                                            ");
 } else {
            out.write("\n");
            out.write("                                                <tr> \n");
            out.write("                                                ");
 row = 1;
            out.write("    \n");
            out.write("                                            ");
 }
            out.write("\n");
            out.write("                                            \n");
            out.write("                                                <td>");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.titulo}", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write(" </td>\n");
            out.write("                                                <td>");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.contenido }", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("</td>\n");
            out.write("                                                <td>");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.seccion }", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("</td>                                     \n");
            out.write("\n");
            out.write("                                                \n");
            out.write("                                                      <td>\n");
            out.write("                                                          <form action=\"./ContenidoIn\" method=\"GET\"> \n");
            out.write("                                                             \n");
            out.write("                                                              <input type=\"hidden\" name=\"titulo\" value=\"");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.titulo}", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("\" />\n");
            out.write("                                                              <input type=\"hidden\" name=\"contenido\" value=\"");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.contenido}", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("\" />\n");
            out.write("                                                              <input type=\"hidden\" name=\"seccion\" value=\"");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.seccion}", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("\" />\n");
            out.write("                                                              \n");
            out.write("                                                              \n");
            out.write("                                                              <input type=\"hidden\" name=\"id\" value=\"");
            out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${lstContenido.idContenido}", java.lang.String.class, (PageContext)_jspx_page_context, null));
            out.write("\" />     \n");
            out.write("                                                              <input type=\"submit\" name=\"detalle\" value=\"Editar\" class=\"button white\"/>\n");
            out.write("                                                          </form>                                                            \n");
            out.write("                                                      </td>\n");
            out.write("                                              </tr>\n");
            out.write("                                        ");
            int evalDoAfterBody = _jspx_th_c_forEach_0.doAfterBody();
            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
              break;
          } while (true);
        }
        if (_jspx_th_c_forEach_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
          return;
        }
      } catch (Throwable _jspx_exception) {
        while (_jspx_push_body_count_c_forEach_0[0]-- > 0)
          out = _jspx_page_context.popBody();
        _jspx_th_c_forEach_0.doCatch(_jspx_exception);
      } finally {
        _jspx_th_c_forEach_0.doFinally();
        _jspx_tagPool_c_forEach_var_items.reuse(_jspx_th_c_forEach_0);
      }
      out.write("\n");
      out.write("                                                              \n");
      out.write("                                        <div id=\"listitems-pagination\" style=\"display:none\">\n");
      out.write("                                            <a id=\"listitems-previous\" href=\"#\" class=\"disabled\">&laquo; Anterior</a> \n");
      out.write("                                            <a id=\"listitems-next\" href=\"#\">Siguiente &raquo;</a> \n");
      out.write("                                        </div>\n");
      out.write("                     </tbody>\n");
      out.write("                                              \n");
      out.write("                        ");
 }
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("                                  \n");
      out.write("                   </table>\n");
      out.write("                          \n");
      out.write("                    \n");
      out.write("\t\t</div> \n");
      out.write("    \n");
      out.write("            \n");
      out.write("    \n");
      out.write("    \n");
      out.write("    </body>\n");
      out.write("\n");
      out.write("</html>\n");
      out.write("\n");
      out.write("\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
